package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.common.service.share.dto.page.PageParamRequest;
import com.sright.bcard.content.dal.dao.MessageDAO;
import com.sright.bcard.content.dal.entity.MessageDO;
import com.sright.bcard.content.dal.mapper.MessageDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class MessageDAOImpl extends BaseDAOImpl<MessageDO> implements MessageDAO {

    @Resource
    private MessageDOMapper messageDOMapper;

    @Override
    protected BaseMapper<MessageDO> getObjMapper() {
        return messageDOMapper;
    }

    @Override
    public MessageDO selectByMemberId(Long memberId) {
        return messageDOMapper.selectByMemberId(memberId);
    }

    @Override
    public Integer count(String companyLike, Integer status, Integer isOpened) {
        return messageDOMapper.count(companyLike, status, isOpened);
    }

    @Override
    public List<MessageDO> pageList(String keyword, Integer status, Integer isOpened, PageParamRequest request) {
        return messageDOMapper.pageList(keyword, status, isOpened, request);
    }
}
